import sys
sys.path.append("/Users/liyishan/myPythonProjects/python-leetcode")
from node.TreeNode import TreeNode

def increasingBST(self, root: TreeNode) -> TreeNode:
    res = []
    def inorder(node):
        if not node:
            return
        inorder(node.left)
        res.append(node.val)
        inorder(node.right)
    inorder(root)
    dummyNode = TreeNode(-1)
    currNode = dummyNode
    for value in res :
        currNode.right = TreeNode(value)
        currNode = currNode.right
    return dummyNode.right
